package com.example.a2207_zh.database

import android.app.Application
import androidx.room.Room

/**
 * 数据库工具类
 */
class AppDBUtils {
    companion object{
        private lateinit var appDatabase: AppDatabase
        fun init(application: Application){
            appDatabase = Room.databaseBuilder(application,AppDatabase::class.java,"2207zh.db")
                .allowMainThreadQueries()
                .build()
        }
        fun getDb() = appDatabase
    }
}